package com.ideaaedi.zoo.example.springboot.flowable.sharding.entity.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collection;
import java.util.Set;

/**
 * (non-javadoc)
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 1.0.0
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
public class ShardingVarListQueryDTO extends ShardingBaseQueryDTO {
    
    /**
     * 租户值
     */
    @Nonnull
    private String tenant;
    
    /**
     * 流程实例id
     */
    @Nullable
    private String processInstanceId;
    
    /**
     * 流程实例id集合
     */
    @Nullable
    private Set<String> processInstanceIds;
    
    /**
     * 查询指定任务id所关联的流程实例的所有变量
     * <pre>
     * 注：此参数为任务id集合。代码形如
     * {@code
     * select * from ACT_HI_VARINST WHERE PROC_INST_ID_ in (select PROC_INST_ID_ from ACT_HI_VARINST where TASK_ID_ in (processByTaskIds))"
     * }
     * </pre>
     */
    @Nullable
    private Set<String> processByTaskIds;
    
    /**
     * 根据变量值进行精确查询
     *
     * <pre>
     * 内部之间使用or逻辑组装，即：
     * {@code
     * and (var1=value1 or var2=value2 or var3=value3 )
     * }
     * </pre>
     */
    @Nullable
    private Collection<VarQueryParam> orVarEqualsColl;
}
